// 引入基础包
import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel';

/**
 * @description: Login interface parameters
 */
export interface LoginParams {
  username: string;
  password: string;
  uuid: string;
  code: string;
}

export interface RoleInfo {
  roleName: string;
  value: string;
}

/**
 * @description: Login interface return value
 */

export interface LoginResultModel {
  loginId: string | number;
  tokenName: string;
  tokenValue: string;
  refreshToken: string;
  roleId: string | number;
  tenantId: string;
  userName: string;
}

/**
 * @description: Get user information return value
 */
export interface GetUserInfoModel {
  roles: RoleInfo[];
  permissions: [];
  // 用户id
  userId: string | number;
  // 用户名
  username: string;
  // 真实名字
  nickname: string;
  // 头像
  avatar: string;
  // 介绍
  desc?: string;
  // 角色Id
  roleId: string | number;
}

export interface GetCaptchaModel {
  // 验证码地址
  codeUrl: string;
  // 惟一key
  key: string;
}


// 定义查询参数
export type UserVO = BasicPageParams & {
  name?: string;
  path?: string;
};

// 定义用户对象
export interface User {
  id: string;
  account: string;
  password?: string;
  name: string;
  nickname: string;
  avatar: string;
  email: string;
  telephone: string;
  birthday: string;
  sex: number;
  roleId: string | number;
  departId: string | number;
  status: number;
  departName: string;
  roleName: string;
}

// 根据用户对象生成响应模型
export type UserDTO = BasicFetchResult<User>;
